﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _11._24._2014_AngularPractice.Data.Models
{
    public class UserCar
    {
        [Key]
        public int UserCarId { get; set; }
        public int CarId { get; set; }
        [ForeignKey("CarId")]
        public virtual Car Car { get; set; }
        [Required]
        public string UserId { get; set; }
        [ForeignKey("UserId"), InverseProperty("UserCars")]
        public virtual ApplicationUser User { get; set; }
    }
}
